Skip to content

feat: add VLLMRanker#3174

Merged
anakin87 merged 5 commits into
mainfrom
vllm-ranker
Apr 17, 2026
Merged

feat: add VLLMRanker#3174
anakin87 merged 5 commits into
mainfrom
vllm-ranker

Conversation

@anakin87
Copy link
Copy Markdown
Member

@anakin87 anakin87 commented Apr 17, 2026

Related Issues

Proposed Changes:

  • add ranker component for models served with vLLM: cross-encoders, late interaction models, ... (supported models)
    • use the /v1/rerank endpoint: we call it with httpx (differently from other components; this is not part of the OpenAI standard)

How did you test it?

New unit and integration tests

Checklist

@github-actions github-actions Bot added topic:CI integration:vllm type:documentation Improvements or additions to documentation labels Apr 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

Coverage report (vllm)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  integrations/vllm/src/haystack_integrations/components/embedders/vllm
  document_embedder.py
  text_embedder.py
  integrations/vllm/src/haystack_integrations/components/rankers/vllm
  ranker.py 214, 245, 250
Project Total  

This report was generated by python-coverage-comment-action

@anakin87 anakin87 marked this pull request as ready for review April 17, 2026 08:49
@anakin87 anakin87 requested a review from a team as a code owner April 17, 2026 08:49
@anakin87 anakin87 requested review from bogdankostic and davidsbatista and removed request for a team and davidsbatista April 17, 2026 08:49
Copy link
Copy Markdown
Contributor

@bogdankostic bogdankostic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good overall, I just have one minor nit regrading the readability of a return statement.

Comment thread integrations/vllm/src/haystack_integrations/components/rankers/vllm/ranker.py Outdated

def test_parse_response_raises_on_error(self):
with pytest.raises(RuntimeError, match="boom"):
VLLMRanker._parse_response({"detail": "boom"}, [], score_threshold=None)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💣

anakin87 and others added 2 commits April 17, 2026 14:33
…/vllm/ranker.py

Co-authored-by: bogdankostic <bogdankostic@web.de>
@anakin87 anakin87 merged commit 4a15b8b into main Apr 17, 2026
11 checks passed
@anakin87 anakin87 deleted the vllm-ranker branch April 17, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:vllm topic:CI type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants